<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title></title>
    <link rel="stylesheet" href="../style/ucs.css">
    <link rel="stylesheet" href="../content/font/iconfont.css">
    <link rel="stylesheet" href="../style/theme.css">
</head>
<body>
    <div id="giraffe"></div>
    <script type="text/javascript" src="../../dist/libs/u-eventhub.js"></script>
    <script type="text/javascript" src="../../dist/libs/engine.js"></script>
    <script type="text/javascript" src="../../dist/ucsmy-ui.js"></script>

    <script type="text/javascript">


        //个人实名信息
        var realNameInfoDM = new UDM({
            value:{
                IsNew:0, //是否有新消息
                AccType:0,
                Mobile:"",
                IsBindMobile:false,//是否绑定手机
                BindMobileUrl:"../UserInfo/index.html",//绑定手机链接
                IsBindIDCard:false,//是否验证身份
                BindIDCardUrl:"../UserInfo/index.html",//验证身份链接
                IsBindBankCard:false,//是否绑卡
                BindBankCardUrl:"../MyBankCard/index.html",//绑卡链接
                Current:"InvestAccount",  //当前选中菜单
                InvestAccountUrl:"../MyAccount/index.html",//投资账户总览链接
                InvestListUrl:"../MyInvest/index.html",//投资记录链接
                MyBankCardUrl:"../MyBankCard/index.html",//我的银行卡链接
                InvestInfoUrl:"../UserInfo/index.html",//投资个人信息
                InvestMessageUrl:"../UserMessageCenter/index.html",//投资消息中心
                FinanceAccountUrl:"../FinanceAccount/index.html",//融资账户总览链接
                FinanceListUrl:"../FinanceList/index.html",//融资记录链接
                FinanceAccountInfoUrl:"../AccountInfo/index.html",//融资账号信息
                FinanceMessageUrl:"../CompanyMessageCenter/index.html"//融资消息中心
            }
        })
        // 个人投资信息
        var accountInvestDM = new UDM({
            value: {
                AccType:0,
                UncollectedPrincipal:"",//待收本金
                UncollectedIncome:"",//待收收益
                TotalIncome:""//累计收益
            }
        })

        //投资记录模型
        var investRecordDM = new UDM({
            value:{
                list:[
//                    {
//                        ProjectUrl:"", //项目详情链接
//                        ProjectName:  "",//项目名称
//                        PayAmount:  "",	//投资金额
//                        Income:  "",	//预期收益
//                        ValueBegin:"",	//项目起息日
//                        RepayBegin: "",	//项目到期日
//                        UserCenterOrderStatus: 10
//                    }
                ],
                noPrecedent:-1    //1:代表从未投资过 0：代表投资过，筛选条件无结果 -1：代表空白
            }
        })

        //模拟后台返回数据
        var listValue = [
            {
                ProjectUrl:"../MyInvestDetail/index.html", //项目详情链接
                ProjectName:  "商票理财【20160002】",//项目名称
                PayAmount:  360.123,	//投资金额
                Income:  "360",	//预期收益
                ValueBegin:"2017-01-20",	//项目起息日
                RepayBegin: "2017-03-20",	//项目到期日
                UserCenterOrderStatus: 20
            },
            {
                ProjectUrl:"../MyInvestDetail/index.html", //项目详情链接
                ProjectName:  "商票理财【20160002】",//项目名称
                PayAmount:  17217.2,	//投资金额
                Income:  "360",	//预期收益
                ValueBegin:"2017-01-20",	//项目起息日
                RepayBegin: "2017-03-20",	//项目到期日
                UserCenterOrderStatus: 10
            },
            {
                ProjectUrl:"../MyInvestDetail/index.html", //项目详情链接
                ProjectName:  "商票理财【20160002】",//项目名称
                PayAmount:  123456,	//投资金额
                Income:  "360",	//预期收益
                ValueBegin:"2017-01-20",	//项目起息日
                RepayBegin: "2017-03-20",	//项目到期日
                UserCenterOrderStatus: 30
            },
            {
                ProjectUrl:"../MyInvestDetail/index.html", //项目详情链接
                ProjectName:  "商票理财【20160002】",//项目名称
                PayAmount:  10000,	//投资金额
                Income:  "360",	//预期收益
                ValueBegin:"2017-01-20",	//项目起息日
                RepayBegin: "2017-03-20",	//项目到期日
                UserCenterOrderStatus: 60
            }
        ];
        var ajaxFn = function () {

            var curListValue = [];
            var account = {
                UncollectedPrincipal:"10030",//待收收益
                UncollectedIncome:"1020000",//待收本金
                TotalIncome:"100"//累计收益
            }

            var realName = {
                AccType:0,
                Mobile:"155****2132",
                IsBindMobile:true,//是否绑定手机
                BindMobileUrl:"../UserInfo/index.html",//绑定手机链接
                IsBindIDCard:false,//是否验证身份
                BindIDCardUrl:"../UserInfo/index.html",//验证身份链接
                IsBindBankCard:false,//是否绑卡
                BindBankCardUrl:"../MyBankCard/index.html",//绑卡链接
                Current:"InvestAccount",  //当前选中菜单
                InvestAccountUrl:"../MyAccount/index.html",//投资账户总览链接
                InvestListUrl:"../MyInvest/index.html",//投资记录链接
                MyBankCardUrl:"../MyBankCard/index.html",//我的银行卡链接
                InvestInfoUrl:"../UserInfo/index.html",//投资个人信息
                InvestMessageUrl:"../UserMessageCenter/index.html",//投资消息中心
                FinanceAccountUrl:"../FinanceAccount/index.html",//融资账户总览链接
                FinanceListUrl:"../FinanceList/index.html",//融资记录链接
                FinanceAccountInfoUrl:"../AccountInfo/index.html",//融资账号信息
                FinanceMessageUrl:"../CompanyMessageCenter/index.html"//融资消息中心
            }
            setTimeout(function () {
                investRecordDM.setValue({list:listValue});
            },2000)

            accountInvestDM.setValue(account);
            realNameInfoDM.setValue(realName)
        }
        var PageDM = {
            investRecord: investRecordDM,
            accountInvest: accountInvestDM,
            realNameInfo: realNameInfoDM
        }
        UEventHub.on('pageLoad', function(v){
            ajaxFn();
            console.log(v);
            UEventHub.emit("test","你好，","世界！");
        });
    </script>
<script type="text/javascript" src="../MyAccount\index.js"></script></body>
</html>